<ui:composition template="/WEB-INF/templates/showcase.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:o="http://omnifaces.org/ui"
>
	<ui:define name="description">
		<p>
			A default implementation of the <code>PhaseListener</code> interface. This is an abstract class which takes
			the <code>PhaseId</code> as constructor argument and provides no-op <code>beforePhase()</code> and
			<code>afterPhase()</code> methods. This should reduce unnecessary interface method overriding boilerplate 
			when implementing.
		</p>
		<p>
			Here's an implementation example:
		</p>
		<pre class="prettyprint"><code class="lang-java">
public class MessagesPhaseListener extends DefaultPhaseListener {

    public MessagesPhaseListener() {
        super(PhaseId.RENDER_RESPONSE);
    }
    
    @Override
    public void beforePhase(PhaseEvent event) {
        for (FacesMessage message : event.getFacesContext().getMessageList()) {
            // ...
        }
    }

}
 		</code></pre>
	</ui:define>		
</ui:composition>